/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.mobbuzz.page.menu.inbox;

import com.sun.lwuit.Container;
import com.sun.lwuit.Font;
import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.TextArea;
import com.sun.lwuit.layouts.BorderLayout;
import com.sun.lwuit.layouts.BoxLayout;
import com.sun.lwuit.plaf.Border;
import edu.mobbuzz.page.menu.Menu;

/**
 *
 * @author penyihir kecil
 */
public class MessagePage extends Menu{
    private Form messageForm;
    private Container messsagePanel;
    private TextArea fromTxtArea;
    private Label dateLbl;
    private TextArea contentTxtArea;
    
    public MessagePage(){
        messageForm = new Form();
        messsagePanel = new Container();
        fromTxtArea = new TextArea(2,1);
        dateLbl = new Label();
        contentTxtArea = new TextArea(5, 20);
    }
    
    public void showPage(){    
        fromTxtArea.setText("Pemerintah berencana menaikkan harga bahan pokok sebesar 20 persen");
        fromTxtArea.setFocusable(false);
        fromTxtArea.setEditable(false);
        fromTxtArea.setGrowByContent(true);
        fromTxtArea.getStyle().setMargin(10, 0, 10, 10); 
        fromTxtArea.getStyle().setBgColor(0xFFFFFF);
        fromTxtArea.getStyle().setBgSelectionColor(0xFFFFFF);
        fromTxtArea.getStyle().setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
        fromTxtArea.getStyle().setBorder(Border.getEmpty());
        
        dateLbl.setText("23 July 2008");
        dateLbl.getStyle().setMargin(0, 10, 10, 10); 
        contentTxtArea.setText("suatu hari di hutan rimba di ujung selatan indonesia");
        contentTxtArea.getStyle().setMargin(2, 10, 10, 10); 
        messsagePanel.setLayout(new BoxLayout(BoxLayout.Y_AXIS));  
        messsagePanel.addComponent(fromTxtArea);
        messsagePanel.addComponent(dateLbl);
        messsagePanel.addComponent(contentTxtArea);
        messageForm.setLayout(new BorderLayout());  
        messageForm.addComponent(BorderLayout.CENTER, messsagePanel);  
        
        messageForm.show();
    }
    
    public String getMenuTitle() {
        return "Message";
    }
}
